package com.sx.zongzhi.fragment;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.sx.zongzhi.R;
import com.sx.zongzhi.activity.BuildingActivity;
import com.sx.zongzhi.activity.EconomicOrganizationActivity;
import com.sx.zongzhi.activity.FactHouseActivity;
import com.sx.zongzhi.activity.FixedActivity;
import com.sx.zongzhi.activity.HouseholdActivity;
import com.sx.zongzhi.activity.MovePopulationActivity;
import com.sx.zongzhi.activity.NewSocietyOrganizationActivity;
import com.sx.zongzhi.activity.OverseasActivity;
import com.sx.zongzhi.activity.RentHouseActivity;

import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by XZY on 2017/11/21.
 * 采集
 */
public class CollectFragment extends Fragment {


    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
                             @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_collect,container,false);
        ButterKnife.bind(this,view);
        return view;
    }


    @OnClick({R.id.tv_Household,R.id.tv_Move,R.id.tv_Overseas,R.id.tv_Fixed,R.id.tv_House,
            R.id.tv_LeaseHouse,R.id.tv_NotPub,R.id.tv_NewOrganization,R.id.tv_Building})
    public void OnClick(View view){
        switch (view.getId()){
            case R.id.tv_Household://户籍人口
                startActivity(new Intent(getActivity(), HouseholdActivity.class));
                break;
            case R.id.tv_Move://流动人口
                startActivity(new Intent(getActivity(), MovePopulationActivity.class));
                break;
            case R.id.tv_Overseas://境外人口
                startActivity(new Intent(getActivity(), OverseasActivity.class));
                break;
            case R.id.tv_Fixed://留守人口
                startActivity(new Intent(getActivity(), FixedActivity.class));
                break;
            case R.id.tv_House://实有房屋
                startActivity(new Intent(getActivity(), FactHouseActivity.class));
                break;
            case R.id.tv_LeaseHouse://出租房
                startActivity(new Intent(getActivity(), RentHouseActivity.class));
                break;
            case R.id.tv_Building://楼宇
                startActivity(new Intent(getActivity(), BuildingActivity.class));
                break;
            case R.id.tv_NotPub://非公有制经济组织
                startActivity(new Intent(getActivity(), EconomicOrganizationActivity.class));
                break;
            case R.id.tv_NewOrganization://新社会组织
                startActivity(new Intent(getActivity(), NewSocietyOrganizationActivity.class));
                break;
        }
    }
}
